{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>某科技公司</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="{% static "lib/bootstrap/css/bootstrap.css" %}">
    <link rel="stylesheet" type="text/css" href="{% static "stylesheets/theme.css" %}">
    <link rel="stylesheet" href="{% static "lib/font-awesome/css/font-awesome.css" %}">
    <link rel="stylesheet" type="text/css" href="{% static "css/tekview.css" %}">
    <script src="{% static "lib/jquery-1.7.2.min.js" %}" type="text/javascript"></script>
    <script src="{% static "lib/bootstrap/js/bootstrap.min.js" %}" type="text/javascript"></script>
    <script src="{% static "lib/highcharts.js" %}" type="text/javascript"></script>
    <script src="{% static "lib/gateone.js"  %}" type="text/javascript"  ></script>
    <script src="{% static "lib/tekview.js" %}" type="text/javascript" charset="gbk"></script>
    <script type="text/javascript" >

    </script>
    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
        .navbar-inner {
            position:fixed;
            left:0px
            top:0px
            z-index:20;
            width:100%;
            hight:0px;
            background:#ccc
        }
         .blank{ clear:both; overflow:hidden; display:block; overflow:hidden;height:37px;}
       #myModal .modal-body {
            max-height: 900px;border:1px #EE9A00 solid;
        }
        #myModal {
        /* SET THE WIDTH OF THE MODAL 设置Modal的宽度*/
        width: 900px;
        /* CHANGE MARGINS TO ACCOMODATE THE NEW WIDTH (original = margin: -250px 0 0 -280px;) */
        margin: -250px 0 0 -450px;
        }
        #myModal {
        margin: -300px 0 0 -280px; /* PLAY THE WITH THE VALUES TO SEE GET THE DESIRED EFFECT */
        }
    </style>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>

</head>

<!--[if lt IE 7 ]>
<body class="ie ie6"> <![endif]-->
<!--[if IE 7 ]>
<body class="ie ie7 "> <![endif]-->
<!--[if IE 8 ]>
<body class="ie ie8 "> <![endif]-->
<!--[if IE 9 ]>
<body class="ie ie9 "> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<body class="">
<!--<![endif]-->

<div class="navbar">
    <div class="navbar-inner">
        <ul class="nav pull-right">

            <li><a href="#" class="hidden-phone visible-tablet visible-desktop" role="button">功能未添加</a></li>
            <li id="fat-menu" class="dropdown">
                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="icon-user"></i> {{ username }}
                    <i class="icon-caret-down"></i>
                </a>

                <ul class="dropdown-menu">
                    <li><a tabindex="-1" href="#">我的账户</a></li>
                    <li class="divider"></li>
                    <li><a tabindex="-1" class="visible-phone" href="#">setting</a></li>
                    <li class="divider visible-phone"></li>
                    <li><a tabindex="-1" href="{% url "devops.auth.views.dt_logout" %}">注销</a></li>
                </ul>
            </li>

        </ul>
        <a class="brand"><span class="first"></span> <span class="second">内部资源管理系统</span></a>
    </div>
</div>
<span class="blank"></span>

<div class="sidebar-nav">
    <form class="search form-inline">
        <input type="text" placeholder="查找...">
    </form>

    <a href="#dashboard-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>资源管理<i class="icon-chevron-up"></i></a>
    <ul id="dashboard-menu" class="nav nav-list collapse in">
        <li><a href="{% url "gaga.views.index" %}">首页</a></li>
        <li><a href="{% url "gaga.views.testresource" %}">资源列表</a></li>
        <li><a href="#">资源申请</a></li>
        <li><a href="{% url "gaga.views.wiki" %}">知识库</a></li>
        <li><a href="{% url "gaga.views.samba" %}">服务器管理</a></li>
    </ul>
 <a href="#accounts-menu" class="nav-header" data-toggle="collapse"><i class="icon-briefcase"></i>业务管理<i class="icon-chevron-up"></i></a>
        <ul id="accounts-menu" class="nav nav-list collapse">
            <li ><a href="{% url 'gaga.views.noreal'%}" target="_blank">1</a></li>
            <li ><a href="{% url 'gaga.views.noreal'%}" target="_blank">2</a></li>
            <li ><a href="{% url 'gaga.views.noreal'%}" target="_blank">3</a></li>
        </ul>

        <a href="#error-menu" class="nav-header collapsed" data-toggle="collapse"><i class="icon-exclamation-sign"></i> Devops<i class="icon-chevron-up"></i></a>
        <ul id="error-menu" class="nav nav-list collapse">
            <li ><a href="/ansible">Ansible</a></li>
            <li ><a href="{% url 'gaga.views.noreal'%}" target="_blank">Zabbix</a></li>
            <li ><a href="{% url 'gaga.views.noreal'%}" target="_blank">Cobbler</a></li>

        </ul>

        <a href="#legal-menu" class="nav-header" data-toggle="collapse"><i class="icon-legal"></i>统一终端<i class="icon-chevron-up"></i></a>
        <ul id="legal-menu" class="nav nav-list collapse">

            <li ><a href="https://192.168.6.63" target="_blank">webSSH</a></li>
        </ul>

    <a href="{% url 'gaga.views.webcontrol'%}" class="nav-header"><i class="icon-question-sign"></i>Web控制台</a>

</div>


<div class="content">

    <div class="header">

        <h1 class="page-title">服务器管理</h1>
    </div>


    <div class="container-fluid">
        <div class="row-fluid">

            <div class="btn-toolbar">
                <button class="btn  btn-info"><i class="icon-eye-open" ></i>服务器列表</button>
                <div class="btn-group">
                </div>
            </div>
            <div class="well">
                <table class="table table-hover table-striped table-bordered">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>IP地址</th>
                        <th>主机名</th>
                        <th>类型</th>
                        <th>版本</th>
                        <th style="width: 110px;">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for i in obj %}
                    <tr>
                        <td>{{ i.pk }}</td>
                        <td>{{ i.serverip }}</td>
                        <td>{{ i.mingcheng }}</td>
                        <td>{{ i.leixing }}</td>
                        <td>{{ i.version }}</td>

                        <td>

                             <a href="#myModal" data-toggle="modal"><i class="icon-play"></i>进入webSSH</a>


                        </td>
                    </tr>
                    {% endfor %}
                    </tbody>
                </table>


           <!-- Modal -->
            <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-header" style="background-color:#F0FFFF">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel"><b>Web SSH</b></h3>
            </div>
            <div class="modal-body">

                     <div id="gateone_container" style="position: relative; width: 60em; height: 30em;">
                        <div id="gateone"></div>
                     </div>
                 </div>
            <div class="modal-footer" style="background-color:#F0FFFF">
                <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
                <button class="btn btn-primary" onclick="webSSH();">连接</button>
            </div>
            </div>

            <footer>
                <hr>


              <p>&copy; 2014<a href="http://www.tekview.com/" target="_blank">APEX</a></p>
            </footer>

        </div>
    </div>
</div>

    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });

    </script>

</body>
</html>


